from flask import render_template, Blueprint, request
from flask_siwadoc import SiwaDoc

from create_app import create_flask
from view import *
from config import ENV

app = create_flask()


if ENV == 'xianshan':
    app.register_blueprint(users, url_prefix='/user')
    app.register_blueprint(house, url_prefix='/house')
    app.register_blueprint(order, url_prefix='/order')
else:
    app.register_blueprint(back, url_prefix='/back')
    app.register_blueprint(bxx, url_prefix='/bxx')


@app.route('/<html>')
def look_html(html):
    return render_template(html)


@app.route('/')
def index():
    return render_template('index.html')


if __name__ == '__main__':
    print(app.url_map)
    app.run(host='0.0.0.0', port=9527, threaded=True)
